package com.zc.study.designPattern.创建型设计模式.prototypePattern.prototypeManager;

public class Test {
    public static void main(String[] args) {
        //获取原型管理对象
        PrototypeManager pm = PrototypeManager.getPm();
        OfficalDocument far1 = pm.getDoc("far");
        OfficalDocument far2 = pm.getDoc("far");
        far1.display();
        far2.display();
        System.out.println(far1 == far2);

        OfficalDocument srs1 = pm.getDoc("srs");
        OfficalDocument srs2 = pm.getDoc("srs");
        srs1.display();
        srs2.display();
        System.out.println(srs1 == srs2);

    }
}
